package com.xnx3.banmahuishou.core.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.xnx3.j2ee.entity.BaseEntity;

/**
* 抽奖的奖品表
* @author zxy
*/
@Entity()
@Table(name = "laji_luck_draw_prize")
public class LuckDrawPrize extends BaseEntity implements java.io.Serializable{
	/**
	 * 奖品类型 1：积分
	 */
	public static final Short TYPE_INTEGRAL = 1;
	/**
	 * 奖品类型 2：实际物品
	 */
	public static final Short TYPE_MATERIAL = 2;
	
	private Integer id ; 	//自增id
	private String prizeName ;	//奖品名称,例如: 重在参与环保, 100积分...
	private Integer prizeNum ;	//奖品奖励额度,例如: 重在参与环保: 0, 100积分: 100....
	private Integer count ;	//奖品个数
	private String prizelevel ;	//奖品等级, 例如: 一等奖, 参与奖...
	private Integer addTime ;	//添加时间,十位数时间戳
	private Integer prizeProbability;	//中奖概率, 整数, 例如: 35%的概率,这里就是35
	private Integer type; 	//奖品类型, 1: 积分, 2: 实际物品
	private Integer prizeSort;	//参与奖排序第一, 一等奖排序最后, 即奖项越大排序越靠后。 例如: 参与奖是 1, 三等奖是2, 二等奖是3, 一等奖是4
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getPrizeName() {
		return prizeName;
	}
	@Column(name = "prize_name", columnDefinition="char(30) COLLATE utf8mb4_general_ci COMMENT '奖品名称,例如: 重在参与环保, 100积分...' default ''")
	public void setPrizeName(String prizeName) {
		this.prizeName = prizeName;
	}
	public Integer getPrizeNum() {
		return prizeNum;
	}
	
	@Column(name = "prize_num", columnDefinition="int(11) COMMENT '奖品奖励额度,例如: 重在参与环保: 0, 100积分: 100....' default '0'")
	public void setPrizeNum(Integer prizeNum) {
		this.prizeNum = prizeNum;
	}
	@Column(name = "count", columnDefinition="int(11) COMMENT '奖品个数' default '0'")
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	@Column(name = "prize_level", columnDefinition="char(10) COLLATE utf8mb4_general_ci COMMENT '奖品等级, 例如: 一等奖, 参与奖...' default ''")
	public String getPrizelevel() {
		return prizelevel;
	}
	public void setPrizelevel(String prizelevel) {
		this.prizelevel = prizelevel;
	}
	@Column(name = "add_time", columnDefinition="int(11) COMMENT '添加时间,十位数时间戳' default '0'")
	public Integer getAddTime() {
		return addTime;
	}
	public void setAddTime(Integer addTime) {
		this.addTime = addTime;
	}
	@Column(name = "prize_probability", columnDefinition="int(11) COMMENT '中奖概率, 整数, 例如: 35%的概率,这里就是35' default '0'")
	public Integer getPrizeProbability() {
		return prizeProbability;
	}
	public void setPrizeProbability(Integer prizeProbability) {
		this.prizeProbability = prizeProbability;
	}
	@Column(name = "type", columnDefinition="int(3) COMMENT '奖品类型, 1: 积分, 2: 实际物品' default '0'")
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	@Column(name = "prize_sort", columnDefinition="int(3) COMMENT '参与奖排序第一, 一等奖排序最后, 即奖项越大排序越靠后。 例如: 参与奖是 1, 三等奖是2, 二等奖是3, 一等奖是4' default '0'")
	public Integer getPrizeSort() {
		return prizeSort;
	}
	public void setPrizeSort(Integer prizeSort) {
		this.prizeSort = prizeSort;
	}
	@Override
	public String toString() {
		return "LuckDrawPrize [id=" + id + ", prizeName=" + prizeName + ", prizeNum=" + prizeNum + ", count=" + count
				+ ", prizelevel=" + prizelevel + ", addTime=" + addTime + ", prizeProbability=" + prizeProbability
				+ ", type=" + type + ", prizeSort=" + prizeSort + "]";
	}
	
}
